// 删除 回收站 日记 接口

const db = require('../db')
exports.delete = (req, res) => {
  const { id, articleid } = req.query
  // console.log(id, articleid)
  const delArticleSql = `delete from delete_article where id="${id}" and articleid ="${articleid}"`
  db.query(delArticleSql, (err, data) => {
    if (err) return console.log('delArticleSql语句错误' + err)
    if (data.affectedRows === 1) {
      return res.send({ status: 201, mes: '删除用户回收站日记成功' })
    }
    return res.send({
      mes: '删除用户回收站日记失败',
      status: 202
    })
    // console.log(data)
  })
}
